<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

$router->group(['namespace'=>'Home','middleware' => 'category'],function(){
    Route::get('/',['as'=>'home.index','uses'=>'HomeController@index']);
    Route::get('/detail/{id}',['as'=>'home.detail','uses'=>'HomeController@detail']);
    Route::post('/ajaxData',['as'=>'home.ajaxData','uses'=>'HomeController@ajaxData']);
    //    Article Model
    Route::get('article',['as'=>'article.index','uses'=>'ArticleController@index']);
    Route::get('article/{id}',['as'=>'article.detail','uses'=>'ArticleController@detail']);
    Route::get('lists/{id}',['as'=>'article.lists','uses'=>'ArticleController@lists']);
    Route::get('lists/{id}/{page?}',['as'=>'article.lists','uses'=>'ArticleController@lists']);
    Route::get('search',['as'=>'article.search','uses'=>'ArticleController@search']);
});

